-
Notifications
You must be signed in to change notification settings - Fork 685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding the pipeline for the task explanation and Llm #2190
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: bepitic <[email protected]>
Signed-off-by: bepitic <[email protected]>
Signed-off-by: bepitic <[email protected]>
Hello, I'm looking to make this contribution as effective as possible, so please feel free to share any suggestions, concerns, or ideas you might have. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added my initial comments, will do another round of review
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2190 +/- ##
==========================================
- Coverage 80.78% 80.67% -0.12%
==========================================
Files 248 248
Lines 10859 10885 +26
==========================================
+ Hits 8772 8781 +9
- Misses 2087 2104 +17 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Bepitic <[email protected]>
Signed-off-by: Bepitic <[email protected]>
Signed-off-by: Bepitic <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
I think it would be good to add the OpenAI model implementation to this PR, so that we can run the pipeline and generate some visualizations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR looks good but I am not sure about the expected output. Maybe it would be a good idea to add tests for this is possible.
This is the code I used for visualization. Is this what you would expect? (ignore the noisy image)
from anomalib.utils.visualization.image import ImageResult, ImageVisualizer, VisualizationMode
import numpy as np
from anomalib import TaskType
import matplotlib.pyplot as plt
anomaly_map = np.zeros((100, 100), dtype=np.float64)
anomaly_map[10:20, 10:20] = 1.0
gt_mask = np.zeros((100, 100))
gt_mask[15:25, 15:25] = 1.0
image = np.random.randint(0, 255, size=(100, 100, 3), dtype=np.uint8)
image_result = ImageResult(
image=image,
pred_score=0.9,
pred_label="abnormal",
text_descr=("Some very long text to see how it is formatted in the image"
" Some very long text to see how it is formatted in the image"),
anomaly_map= anomaly_map,
gt_mask = gt_mask,
pred_mask = anomaly_map,
)
image_visualizer = ImageVisualizer(
mode = VisualizationMode.FULL,
task= TaskType.EXPLANATION,
)
result = image_visualizer.visualize_image(image_result)
plt.imshow(result)
plt.show()
Signed-off-by: bepitic <[email protected]>
Signed-off-by: Bepitic <[email protected]>
Signed-off-by: Bepitic <[email protected]>
openai. Signed-off-by: Bepitic <[email protected]>
Signed-off-by: Bepitic <[email protected]>
Signed-off-by: Bepitic <[email protected]>
Co-authored-by: Dick Ameln <[email protected]>
Co-authored-by: Ashwin Vaidya <[email protected]>
Signed-off-by: Bepitic <[email protected]>
Signed-off-by: Bepitic <[email protected]>
Co-authored-by: Samet Akcay <[email protected]>
Co-authored-by: Samet Akcay <[email protected]>
Co-authored-by: Samet Akcay <[email protected]>
Co-authored-by: Samet Akcay <[email protected]>
Co-authored-by: Samet Akcay <[email protected]>
Co-authored-by: Samet Akcay <[email protected]>
Signed-off-by: Bepitic <[email protected]>
Signed-off-by: Bepitic <[email protected]>
Signed-off-by: Bepitic <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks fine overall. I just have a few minor comments.
Co-authored-by: Ashwin Vaidya <[email protected]>
Signed-off-by: Bepitic <[email protected]>
Signed-off-by: Bepitic <[email protected]>
Signed-off-by: Bepitic <[email protected]>
Signed-off-by: Bepitic <[email protected]>
Signed-off-by: Bepitic <[email protected]>
Signed-off-by: Bepitic <[email protected]>
Signed-off-by: Bepitic <[email protected]>
Signed-off-by: Bepitic <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks looks good to me
Signed-off-by: Bepitic <[email protected]>
Signed-off-by: Bepitic <[email protected]>
…ipeline Signed-off-by: Bepitic <[email protected]>
📝 Description
✨ Changes
Select what type of change your PR is:
✅ Checklist
Before you submit your pull request, please make sure you have completed the following steps:
For more information about code review checklists, see the Code Review Checklist.